package com.jt.demo5;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Scope;

@Configuration
@ComponentScan("com.jt")
public class SpringConfig {
    @Bean
//    @Bean("Singleton")单例，默认
//    @Scope("prototype")//多例对象
    public Dog dog(){
        return new Dog();
    }
}
